<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Online Movies - Book your ticket</title>
</head>
 
<body>
         
    <h2>New Registration: </h2>
     
    <form:form method="post" modelAttribute="user" action="save">
  
   				<div class="input_filld">
				<label>Name :</label> <input type="text" name="username" id="username"
						value="" /><label>${usernameMessage}</label>
				</div>
				
				<div class="input_filld">
					<label>Password :</label> <input type="password" name="password" id="password"
						value="" />
				</div>
				
				<div class="input_filld">
					<label>Phone/Mobile No :</label> <input type="number" name="phone" id="phone"
						value="" />
				</div>
				
				<div class="input_filld">
					<label>Email :</label> <input type="email" name="email" id="email"
						value="" />
				</div>
        
     
    <p><input class="button" type="submit" name="submit" value="Register" /></p>
     
    </form:form>
     
    <h2>List of Users</h2>
     
    <table>
        <tr>
            <th>ID</th>
            <th>User Name</th>
            <th>Phone/Mobile No</th>
            <th>E-Mail</th>
        </tr>
         
        <c:forEach items="${users}" var="userVar" varStatus="status">
         
        <tr>
            <td>${userVar.id}</td>
            <td>${userVar.username}</td>
            <td>${userVar.phone}</td>
            <td>${userVar.email}</td>
        </tr>
         
        </c:forEach>
         
    </table>
 
</body>
</html>